package com.unitd.logistics.comm.plugins.module.model;

import com.unitd.logistics.comm.plugins.model.BaseModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Id;

/**
 * 自定义的实体类的基类, 该类用于定义所有实体类的共有和通用字段,以及主键生成策略
 *
 * @author Hudan
 * @version 1.0
 * @filename MybatisEntity.java
 * @copyright www.pactera.com
 * @date 2019-01-23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class MybatisEntity extends BaseModel {

	/** 自增主键ID */
	@Id
	@Column(name = "ID")
	protected Long id;
	/** 表名 */
	@Column(name = "TABLE_NAME")
	public String tableName;

	public MybatisEntity(Long id) {
		this();
		this.id = id;
	}
}